#ifndef _BUILDER_H_
#define _BUILDER_H_
 
#include "product.h"
 
 using namespace std;
 

 //抽象Builder基类，定义不同部分的创建接口
 class Builder
 {
 public:
     virtual void carStart()=0;
     virtual void carStop()=0;
     virtual void carAlarm()=0;
     virtual void carEngineBoom()=0;
     virtual CCarModel* GetCCarModel()=0;
     Builder();
     virtual ~Builder();
 };
 
 //  Builder的派生类,实现BuilderPartA和BuilderPartB和carAlarm接口函数 
 class BuilderBenZ:public Builder
 {
 public:
     BuilderBenZ();
     ~BuilderBenZ();
     virtual void carStart();
     virtual void carStop();
     virtual void carAlarm();
     virtual void carEngineBoom();
     virtual CCarModel* GetCCarModel();
 private:
     CCarModel* m_pCCarModel;
 };
 
 //  Builder的派生类,实现BuilderPartA和BuilderPartB和carAlarm接口函数 
 class BuilderBMW:public Builder
 {
 public:
     BuilderBMW();
     ~BuilderBMW();
     virtual void carStart();
     virtual void carStop();
     virtual void carAlarm();
     virtual void carEngineBoom();
     virtual CCarModel* GetCCarModel();
 private:
     CCarModel* m_pCCarModel;
 };
 
 //BuilderBenZ与BuilderBMW是Builder的两个派生类，用于实现两种不同的建造细节
 

 
 #endif